package com.candy.test;

import com.candy.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Client4 {
    public static void main(String[] args) {
//        创建容器
        ApplicationContext context=new ClassPathXmlApplicationContext("beans_di.xml");
//从容器中获取javabean对象
        AccountService accountService=(AccountService) context.getBean("accountService");
        System.out.println(accountService);
    }
}
